package telebase;

public class Main {

    public static void main(String args[]) {
        // Properties
        Vars.LoadProperties();
        if (!Vars.prop.containsKey("AccessMode")) {
            Vars.prop.setProperty("AccessMode", "Admin");
            Vars.SaveProperties();
        }
        if (!Vars.prop.containsKey("Username")) {
            Vars.prop.setProperty("Username", "telebase");
            Vars.SaveProperties();
        }
        if (!Vars.prop.containsKey("Userpass")) {
            Vars.prop.setProperty("Userpass", "telebase");
            Vars.SaveProperties();
        }
        if (!Vars.prop.containsKey("DB_URL")) {
            Vars.prop.setProperty("DB_URL", "jdbc:mysql://localhost:3306/telebase");
            Vars.SaveProperties();
        }
        if (!Vars.prop.containsKey("LangXML")) {
            Vars.prop.setProperty("LangXML", "i18n_en.xml");
            Vars.SaveProperties();
        }
        // End of Properties

        i18n.LoadXML(Vars.prop.getProperty("LangXML"));

        ContactsView conts = new ContactsView();
        conts.setLocationRelativeTo(null);
        conts.setVisible(true);
    }
}
